[SYCL][test] Add --sysroot=%S/Inputs/SYCL to spir/spirv target RUN lines in clang-linker-wrapper test#22049
[SYCL][test] Add --sysroot=%S/Inputs/SYCL to spir/spirv target RUN lines in clang-linker-wrapper test#22049srividya-sundaram wants to merge 1 commit into
Conversation
…nes in clang-linker-wrapper test.
|
Test failures in pre-commit testing are unrelated to this PR. |
|
Can you update to head? My previous PR that updated this test added the |
Nevermind - this won't work. Due to the stub .bc files being empty, the linking from within the device compilation step will fail: |
@mdtoguchi Are there any other changes needed for this PR? |
No - this can be abandoned. |
After PR #21672, SYCL device libraries are linked at compile time when using --offload-new-driver with SPIR/SPIRV targets. The compile RUN lines in clang-linker-wrapper.cpp that use SPIR-based targets now require the device libraries to be resolvable on disk.
In environments where the device libraries are not installed alongside the compiler (e.g. MSan self builds), these RUN lines fail with "cannot find expected SYCL device library" errors.
Fix by adding --sysroot=%S/Inputs/SYCL to the affected compile RUN lines so the stub .bc files in the test inputs directory are used for path resolution. This is sufficient since these are driver tests that check command line arguments, not actual compilation output.